#if defined __cplusplus
        extern "C" {
#endif

#ifdef WIN
typedef unsigned __int64 ULONGLONG;
#else
typedef unsigned long long ULONGLONG;
#endif

%ENUMS%

void GetAcks(int* count, unsigned int* acks, int maxAcks, unsigned char* udpMessage, int udpMessageLength);
int AppendAcks(unsigned int* acks, int numAcks, unsigned char* udpMessage, int udpMessageLength);

int IsReliable(unsigned char* data);
void SetReliable(unsigned char* data, int val);
int HasAcks(unsigned char* data);
void SetHasAcks(unsigned char* data, int val);

int IsZeroCoded(unsigned char* data);
void SetZeroCoded(unsigned char* data, int val);
unsigned int GetSequenceNumber(unsigned char* data);
void SetSequenceNumber(unsigned char* data, unsigned int seqNumber);
unsigned short GetPacketFrequency(unsigned char* data);
unsigned short GetPacketID(unsigned char* data);
void SetPacketID(unsigned char* data, int frequency, unsigned short val);

void Header_UDP(unsigned char* data, unsigned short packetId, int frequency, unsigned char flags);
void LLUUID_UDP(const char* uuid_string, unsigned char* data, int *i);
void UDP_LLUUID(char* uuid_string, unsigned char* data, int *i);
void Variable2_UDP(const char *val, unsigned char* data, int *i);
void UDP_Variable2(char *val, unsigned char* data, int *i);
void Variable1_UDP(const char *val, unsigned char* data, int *i);
void UDP_Variable1(char *val, unsigned char* data, int *i);
char *UUIDFromU64(ULONGLONG value);
void LLQuaternion_UDP(float x, float y, float z, float w, unsigned char* data, int *i);
void UDP_LLQuaternion(float* x, float* y, float* z, float* w, unsigned char* data, int *i);
void LLVector3_UDP(float x, float y, float z, unsigned char* data, int *i);
void UDP_LLVector3(float* x, float* y, float* z, unsigned char* data, int *i);
void LLVector4_UDP(float x, float y, float z, float s, unsigned char* data, int *i);
void UDP_LLVector4(float* x, float* y, float* z, float* s, unsigned char* data, int *i);
void LLVector3d_UDP(double x, double y, double z, unsigned char* data, int *i);
void UDP_LLVector3d(double* x, double* y, double* z, unsigned char* data, int *i);
void Bool_UDP(int val, unsigned char* data, int *i);
void UDP_Bool(int* val, unsigned char* data, int *i);
void Fixed_UDP(const unsigned char *val, int size, unsigned char* data, int *i);
void UDP_Fixed(unsigned char *val, int size, unsigned char* data, int *i);
void S16_UDP(short val, unsigned char* data, int *i);
void UDP_S16(short* val, unsigned char* data, int *i);
void U64_UDP(ULONGLONG val, unsigned char* data, int *i);
void UDP_U64(ULONGLONG* val, unsigned char* data, int *i);
void F32_UDP(float val, unsigned char* data, int *i);
void UDP_F32(float* val, unsigned char* data, int *i);
void F64_UDP(double val, unsigned char* data, int *i);
void UDP_F64(double* val, unsigned char* data, int *i);
void U32_UDP(unsigned int val, unsigned char* data, int *i);
void UDP_U32(unsigned int *val, unsigned char* data, int *i);
void S32_UDP(int val, unsigned char* data, int *i);
void UDP_S32(int* val, unsigned char* data, int *i);
void U16_UDP(unsigned short val, unsigned char* data, int *i);
void UDP_U16(unsigned short* val, unsigned char* data, int *i);
void IPPORT_UDP(unsigned short val, unsigned char* data, int *i);
void UDP_IPPORT(unsigned short* val, unsigned char* data, int *i);
void U8_UDP(unsigned char val, unsigned char* data, int *i);
void UDP_U8(unsigned char* val, unsigned char* data, int *i);
void S8_UDP(char val, unsigned char* data, int *i);
void UDP_S8(char* val, unsigned char* data, int *i);

%PACKETS%

#if defined __cplusplus
    }
#endif
